<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center fireSupervision_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub fireSupervision_fd0_0'>
					<view class='flex flex-wrap align-center fireSupervision_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  fireSupervision_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='fireSupervision_fd0_0_c1_c0' v-if=" id=='1'">消防监督</text><text
							class='fireSupervision_fd0_0_c1_c0' v-if=" id=='2'">环境卫生</text>
					</view>
					<view class='flex flex-wrap align-center justify-end fireSupervision_fd0_0_c0'>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout fireSupervision_flex_1">
				<view class='flex flex-direction flex-wrap align-stretch fireSupervision_fd1_0'>
					<view class='flex flex-wrap align-center justify-between fireSupervision_fd1_0_c0'>
						<text class='fireSupervision_fd1_0_c0_c0'>监督定位</text>
						<view class='flex flex-wrap align-center'>
							<text class='fireSupervision_fd1_0_c0_c1_c0'>{{city}}</text>
							<image class='fireSupervision_fd1_0_c0_c1_c1' mode="aspectFit" :src='STATIC_URL+"56.png"'>
							</image>
						</view>
					</view>
					<view class='flex flex-direction flex-wrap align-stretch fireSupervision_fd1_0_c0'>
						<view class='flex flex-wrap fireSupervision_fd1_0_c1_c0'>
							<textarea class='flex fireSupervision_input_fd1_0_c1_c0' :placeholder="'请输入详细位置'"
								:maxlength="240" placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx"
								v-model="fd1_0_c1_c0" />
						</view>
					</view>
					<view class='flex flex-wrap align-center justify-between fireSupervision_fd1_0_c0'>
						<text class='fireSupervision_fd1_0_c0_c0'>房屋类型</text>
						<view class='flex flex-wrap align-center' @tap.stop="pickerDiy1695806803484=true">
							<input class='fireSupervision_fd1_0_c2_c1_c0' type="text" :placeholder="`请选择`"
								confirm-type="done" :maxlength="-1" disabled
								placeholder-style="color:rgba(153, 153, 153, 1);font-size:32rpx" v-model="name" />
							<image class='fireSupervision_fd1_0_c2_c1_c1' mode="aspectFit" :src='STATIC_URL+"58.png"'>
							</image>
						</view>
					</view>
					<view class='flex flex-direction flex-wrap align-stretch fireSupervision_fd1_0_c0'>
						<text class='fireSupervision_fd1_0_c3_c0'>存在隐患</text>
						<view class='flex flex-wrap fireSupervision_fd1_0_c1_c0'>
							<textarea class='flex fireSupervision_input_fd1_0_c1_c0' :placeholder="'请输入'"
								:maxlength="240" placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx"
								v-model="fd1_0_c3_c1" />
						</view>
					</view>
					<view class='flex flex-direction flex-wrap align-stretch fireSupervision_fd1_0_c4'>
						<view class='flex flex-wrap align-center fireSupervision_fd1_0_c4_c0'>
							<text class='fireSupervision_fd1_0_c4_c0_c0'>现场取证</text>
							<text class='fireSupervision_fd1_0_c4_c0_c1'>请上传带有拍摄时间的照片</text>
							<text class='fireSupervision_fd1_0_c4_c0_c2'>上传照片</text>
						</view>
						<view class='flex flex-wrap align-center fireSupervision_fd1_0_c4_c1'>
							<benben-images-upload ref="benbenImagesUploadfd1_0_c4_c1_c0" :maxlength="3"
								:img-ids.sync="thumb" :img-list.sync="thumb_url" :is-show-tips='true'>
								<template #content="{ num, maxlength, isShow, imgList }">
									<view class="flex flex-wrap align-start flex">

										<view v-for="(image, index) in imgList" :key="index"
											class='flex position-relative fireSupervision_fd1_0_c4_c1_c00'>
											<text
												class='fu-iconfont2 position-absolute fireSupervision_fd1_0_c4_c1_c000'
												@tap.stop="$refs.benbenImagesUploadfd1_0_c4_c1_c0.delImage(index)">&#xE8E7;</text>
											<image class='fireSupervision_fd1_0_c4_c1_c001'
												@tap.stop="$refs.benbenImagesUploadfd1_0_c4_c1_c0.previewImage(index)"
												mode="aspectFill" :src='image'></image>
										</view>
										<image class='fireSupervision_fd1_0_c4_c1_c01'
											@tap.stop="$refs.benbenImagesUploadfd1_0_c4_c1_c0.manyChooseImage()"
											v-if="isShow" mode="aspectFit" :src='STATIC_URL+"164.jpg"'></image>
									</view>
								</template>
							</benben-images-upload>
						</view>
					</view>
				</view>
				<button class='fireSupervision_fd1_1' @click="clickSubmit">提交</button>
			</view>
			<!---flex布局flex布局结束-->
			<!--选择器开始 -->
			<benben-picker ref="benbenWritePickerCodepicker2" :visible.sync="pickerDiy1695806803484" :label.sync='name'
				:value.sync='housetypeid' :options='homeType' mode='selector' :mask-show='true' :timeout='true'
				:picker-height='88' default-type='value' :default-props='{"label":"name","value":"value"}'>
				<template #picker-header>
					<view class='flex flex-wrap align-center justify-between fireSupervision_picker2_0'>
						<text class='fireSupervision_picker2_0_c0'
							@tap="$refs.benbenWritePickerCodepicker2.cancel()">取消</text>
						<text class='fireSupervision_picker2_0_c1'>房屋类型</text>
						<text class='fireSupervision_picker2_0_c2'
							@tap="$refs.benbenWritePickerCodepicker2.pickerConfirm()">确认</text>
					</view>
				</template>
			</benben-picker>
			<!--选择器结束 -->
		</view>
	</view>
</template>
<script>
	export default {
		components: {},


		data() {
			return {
				thumb: '',
				thumb_url: [],
				"pickerDiy1695806803484": false,
				"fd1_0_c1_c0": "",
				"fd1_0_c3_c1": "",
				"homeType": [{
					"name": "住宅",
					"value": "1",
					"image": ""
				}, {
					"name": "公寓",
					"value": "2",
					"image": ""
				}, {
					"name": "商铺",
					"value": "3",
					"image": ""
				}, {
					"name": "写字楼",
					"value": "4",
					"image": ""
				}, {
					"name": "厂房",
					"value": "6",
					"image": ""
				}],
				"id": "1",
				"name": "",
				city:'河南省郑州市二七区',
				housetypeid:''
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				id
			} = options
			if (id !== undefined) this.id = id
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			clickSubmit(){
				if(!this.fd1_0_c1_c0){
					this.$message.info('详细地址不为空')
					return false
				}
				
				if(!this.fd1_0_c3_c1){
					this.$message.info('存在隐患不为空')
					return false
				}
				if(!this.housetypeid){
					this.$message.info('房屋类型不为空')
					return false
				}
				if(!this.thumb){
					this.$message.info('现场取证不为空')
					return false
				}
				if(!this.city){
					this.$message.info('城市不为空')
					return false
				}
				let arr = {
					type:this.id,
					addr:this.fd1_0_c1_c0,  //详细地址
					city:this.city,
					yinhuan:this.fd1_0_c3_c1,
					images:this.thumb,
					cate_id:this.housetypeid
				}
				this.$api.post('/m6752/655ee159dfec3',arr).then(res=>{
					if(res.data.code == 1){
						this.$message.info(res.data.msg)
						setTimeout(()=>{
							uni.navigateBack({
								delta:1
							})
						},500)
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;
	}

	.fireSupervision_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.fireSupervision_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
		line-height: 36rpx;
	}

	.fireSupervision_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.fireSupervision_fd0_0_c0 {
		width: 120rpx;
	}

	.fireSupervision_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.fireSupervision_flex_1 {
		padding: 24rpx 24rpx 0rpx 24rpx;
	}

	.fireSupervision_fd1_1 {
		background: #FC5F80;
		border-radius: 60rpx 60rpx 60rpx 60rpx;
		width: 638rpx;
		line-height: 88rpx;
		font-size: 32rpx;
		color: #fff;
		height: 88rpx;
		font-weight: 500;
		margin: 0rpx 0rpx 32rpx 32rpx;
	}

	.fireSupervision_fd1_0_c4_c1_c01 {
		width: 210rpx;
		height: 210rpx;
		margin: 0rpx 12rpx 0rpx 0rpx;
		border-radius: 16rpx;
	}

	.fireSupervision_fd1_0_c4_c1_c001 {
		width: 210rpx;
		height: 210rpx;
		border-radius: 16rpx;
	}

	.fireSupervision_fd1_0_c4_c1_c000 {
		top: 10rpx;
		right: 10rpx;
		z-index: 10;
		color: rgba(242, 242, 242, 1);
		font-size: 40rpx;
	}

	.fireSupervision_fd1_0_c4_c1_c00 {
		margin: 0rpx 12rpx 0rpx 0rpx;
		border-radius: 16rpx;
	}

	.fireSupervision_fd1_0_c4_c1 {
		margin: 0rpx -12rpx 0rpx 0rpx;
	}

	.fireSupervision_fd1_0_c4_c0_c2 {
		color: #FF7934;
		font-size: 24rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.fireSupervision_fd1_0_c4_c0_c1 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
	}

	.fireSupervision_fd1_0_c4_c0_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 400;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.fireSupervision_fd1_0_c4_c0 {
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.fireSupervision_fd1_0_c4 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.fireSupervision_fd1_0_c3_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.fireSupervision_fd1_0_c2_c1_c1 {
		width: 10rpx;
		height: 20rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.fireSupervision_fd1_0_c2_c1_c0 {
		text-align: right;
		font-size: 32rpx;
		color: var(--benbenFontColor0);
	}

	.fireSupervision_input_fd1_0_c1_c0 {
		width: 100%;
		height: 140rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		white-space: pre-wrap;
	}

	.fireSupervision_fd1_0_c1_c0 {
		background: #F8F8F8;
		padding: 24rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.fireSupervision_fd1_0_c0_c1_c1 {
		width: 28rpx;
		height: 28rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.fireSupervision_fd1_0_c0_c1_c0 {
		color: #666666;
		font-size: 32rpx;
		font-weight: 400;
	}

	.fireSupervision_fd1_0_c0_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 400;
	}

	.fireSupervision_fd1_0_c0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.fireSupervision_fd1_0 {
		background: var(--benbenbgColor1);
		margin: 0rpx 0rpx 32rpx 0rpx;
		padding: 0rpx 23rpx 0rpx 25rpx;
		border-radius: 16rpx;
		background-size: 100% auto;
	}

	.fireSupervision_picker2_0_c2 {
		color: rgba(252, 95, 128, 1);
		font-size: 32rpx;
	}

	.fireSupervision_picker2_0_c1 {
		color: #333333;
		font-size: 36rpx;
		font-weight: 500;
	}

	.fireSupervision_picker2_0_c0 {
		font-size: 32rpx;
		color: var(--benbenFontColor2);
	}

	.fireSupervision_picker2_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
		border-radius: 25rpx 25rpx 0rpx 0rpx;
		background-size: 100% auto !important;
	}
</style>